package org.sk.gsync.app;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;

import com.google.gdata.client.docs.DocsService;
import com.google.gdata.util.AuthenticationException;

public class GoogleConnection {

    private static final Logger LOGGER = Logger
        .getLogger(GoogleConnection.class);

    @Autowired
    private DocsService docsService;

    public static final String GOOGLE_URL =
        "http://docs.google.com/feeds/default/private/full/";

    public void connect(final String user, final String password,
            final String captcha) throws AuthenticationException {
        docsService.setUserCredentials(user, password, captcha, null);
        LOGGER.info("Connected to Google Docs Account.");
    }

}
